package com.hanlin.hello;

import com.hanlin.entity.User;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 描述：hello 模型的消息中间件
 * @RabbitListener rabbit监听，queue为hello的时候，就是监听hello 通道
 * @author:hl.yuan
 * @date:2021-03-15
 */
@Component
@RabbitListener(queuesToDeclare = @Queue("hello"))
public class HelloCustomer {

    @RabbitHandler
    public void receive1(Object message){

        System.out.println("我是message = " + message);
    }



}
